<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-cf">交易记录</div>
                </div>
                <div class="widget-body am-fr">
                    <!-- 工具栏 -->
                    <div class="page_toolbar am-margin-bottom am-cf">
                        <form class="toolbar-form" action="{:url('food.user.pay/index')}">
                            {if $user['applet']['shop_mode']['value']==20}
                            <div class="am-u-sm-12 am-u-md-12">
                                <div class="am fr">
                                    <div class="am-form-group am-fl">
                                        <select name="shop_id" data-am-selected="{btnSize: 'sm'}">
                                            <option value="0">全部门店</option>
                                            {if isset($category)}
                                                {foreach $category as $item}
                                                <option value="{$item['shop_id']}" {$item['shop_id'] == $shop_id?'selected':''}>{$item['shop_name']}</option>
                                                {/foreach}
                                            {/if}
                                        </select>
                                    </div>
                                    <div class="am-form-group am-fl">
                                        <div class="am-input-group am-input-group-sm tpl-form-border-form">
                                            <div class="am-input-group-btn">
                                                <button class="am-btn am-btn-default am-icon-search" type="submit"></button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            {/if}
                        </form>
                    </div>
                    <div class="am-scrollable-horizontal am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped
                         tpl-table-black am-text-nowrap">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>用户</th>
                                <th>单号</th>
                                <th>类型</th>
                                <th>方式</th>
                                <th>模式</th>
                                <th>数值</th>
                                <th>赠送</th>
                                <th>备注</th>
                                <th>时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            {if !$list->isEmpty()}
                                {foreach $list as $item}
                                <tr>
                                    <td class="am-text-middle">
                                        <p class="item-title">{$item['record_id']}</p>
                                    </td>
                                    <td class="am-text-middle">
                                        <div class="goods-detail">
                                            <div class="goods-image">
                                                <img src="{$item['user']['avatar']}" alt="">
                                            </div>
                                            <div class="goods-info dis-flex flex-dir-column flex-x-center">
                                                <p class="goods-title">I D ：{$item['user']['user_id']}</p>
                                                <p class="goods-title">昵称：{$item['user']['nickname']}</p>
                                                <p class="goods-title">电话：{$item['user']['phone']|default='--'}</p>
                                            </div>
                                        </div>
                                    </td>
                                    <td class="am-text-middle">{$item['order_no']}</td>
                                    <td class="am-text-middle">{$item['type']['text']}</td>
                                    <td class="am-text-middle">{$item['action']['text']}</td>
                                    <td class="am-text-middle">{$item['mode']['text']}</td>
                                    <td class="am-text-middle">{$item['money']}</td>
                                    <td class="am-text-middle">{$item['gift_money']|default='--'}</td>
                                    <td class="am-text-middle">{$item['remark']|default='--'}</td>
                                    <td class="am-text-middle">{$item['create_time']}</td>
                                </tr>
                                {/foreach}
                            {else /}
                                <tr>
                                    <td colspan="10" class="am-text-center">暂无记录</td>
                                </tr>
                            {/if}
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">
                        <div class="am-fr">{:$list->render()} </div>
                        <div class="am-fr pagination-total am-margin-right">
                            <div class="am-vertical-align-middle">总记录：{:$list->total()}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
